package com.shop.shoppingmall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**add_id category_id
 * 订单表(ShOrder)实体类
 *
 * @author makejava
 * @since 2020-10-12 15:33:33
 */
@Data
public class ShOrder implements Serializable {
    private static final long serialVersionUID = 564620142875764609L;
    /**
     * 主键
     */
    private String id;
    /**
     * 订单编号
     */
    private String orderNumber;
    /**
     * 用户id
     */
    @NotBlank(message = "用户id不能为空")
//    @Length(max = 12, message = "用户昵称不能超过12位")
    private String userId;
    /**
     * 商品id
     */
    @NotBlank(message = "商品id不能为空")
    private String productId;
//    @NotBlank(message = "商户id不能为空")
    private String merchantId;
    @NotBlank(message = "地址id不能为空")
    private String addId;
    private String categoryId;
    /**
     * 订单金额
     */
    @NotBlank(message = "订单金额不能为空")
    private BigDecimal orderPrice;

    private BigDecimal coinPrice;

    private BigDecimal reallyPrice;
    /**
     * 商品数量
     */
    @NotBlank(message = "商品数量不能为空")
    private Integer productNum;
    /**
     * 订单状态(0 待付款 1 待发货 2 已发货 3 已完成 4 取消 5 换货售后 )
     */
    private String orderStatus;
    /**
     * 支付类型 1 余额 2 微信 3 支付宝
     */
    private String orderType;
    /**
     * 快递单号
     */
    private String courierNum;

    private String orderAllId;

    private String messages;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date creatTime;
    private String dateTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date updateTime;
    /**
     * 手机号
     */
    private String mobile;

    private String startTime;

    private String endTime;


    private String productSpecs;
    private String loginName;
    private String merchantName;
    private String productName;
    private String photo;

    private String totalCount;
    private String payMentOther;
    private String consignment;
    private String delivered;
    private String afterSale;
    private BigDecimal rebatePrice;


    private Integer total;

    private String consignee;
    private String phone;
    private String location;
    private String detailAddress;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public Integer getProductNum() {
        return productNum;
    }

    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getCourierNum() {
        return courierNum;
    }

    public void setCourierNum(String courierNum) {
        this.courierNum = courierNum;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
